<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/DateFormat.js"></script>
</head>

<body>
    <!-- <form action=""><button>dianji</button></form>
    <form action=""><button>dianji</button></form>
    <form action=""><button>dianji</button></form>
    <form action=""><button>dianji</button></form>
    <form action=""><button>dianji</button></form>
    <form action=""><button>dianji</button></form>
    <form action=""><button>dianji</button></form>
    <form action=""><button>dianji</button></form>
    <form action=""><button>dianji</button></form>
    <form action=""><button>dianji</button></form>
    <img src="https://img11.360buyimg.com/seckillcms/s280x280_jfs/t1/99909/30/5570/468080/5deefd06E0b45ec22/7c8ba1ac749370ae.jpg.webp"
        alt="">
    <img src="https://img11.360buyimg.com/seckillcms/s280x280_jfs/t1/99909/30/5570/468080/5deefd06E0b45ec22/7c8ba1ac749370ae.jpg.webp"
        alt="">
    <img src="https://img11.360buyimg.com/seckillcms/s280x280_jfs/t1/99909/30/5570/468080/5deefd06E0b45ec22/7c8ba1ac749370ae.jpg.webp"
        alt="">
    <img src="https://img11.360buyimg.com/seckillcms/s280x280_jfs/t1/99909/30/5570/468080/5deefd06E0b45ec22/7c8ba1ac749370ae.jpg.webp"
        alt="">
    <img src="https://img11.360buyimg.com/seckillcms/s280x280_jfs/t1/99909/30/5570/468080/5deefd06E0b45ec22/7c8ba1ac749370ae.jpg.webp"
        alt="">
    <img src="https://img11.360buyimg.com/seckillcms/s280x280_jfs/t1/99909/30/5570/468080/5deefd06E0b45ec22/7c8ba1ac749370ae.jpg.webp"
        alt="">
    <img src="https://img11.360buyimg.com/seckillcms/s280x280_jfs/t1/99909/30/5570/468080/5deefd06E0b45ec22/7c8ba1ac749370ae.jpg.webp"
        alt="">
    <img src="https://img11.360buyimg.com/seckillcms/s280x280_jfs/t1/99909/30/5570/468080/5deefd06E0b45ec22/7c8ba1ac749370ae.jpg.webp"
        alt="">
    <img src="https://img11.360buyimg.com/seckillcms/s280x280_jfs/t1/99909/30/5570/468080/5deefd06E0b45ec22/7c8ba1ac749370ae.jpg.webp"
        alt="">
    <img src="https://img11.360buyimg.com/seckillcms/s280x280_jfs/t1/99909/30/5570/468080/5deefd06E0b45ec22/7c8ba1ac749370ae.jpg.webp"
        alt=""> -->
</body>
<script>
    // document 文档对象(window.document)
    // 1. html页面载入到浏览器中 编程了文档的一部分
    // 2. 通过文档(document) 可以访问页面中所有的元素

    // console.log(document); // 向 Web 控制台输出一条消息。
    console.dir(document)  // 打印出一个对象的所有属性和属性值。

    // document对象的属性和方法
    // 属性:
    // all   获取页面中所有元素的集合
    // forms   获取页面中form的集合
    // images  获取页面中img的集合
    // scripts  获取页面中script的集合
    // links  获取页面中links的集合
    // URL    获取当前文档的 URL

    // bgColor  获取和设置文档的背景色

    // !!!!!!!!!!!
    // body             快捷获取body
    // documentElement  快捷获取html
    // head             快捷获取head
    // title            获取和设置网页标题的内容

    // console.log(document.all);
    // console.log(document.forms);
    // console.log(document.images);

    // document.bgColor = "#999";
    // console.log(document.bgColor);

    console.log(document.body);
    console.log(document.documentElement);
    console.log(document.head);

    // console.log(document.title);
    // document.title = "hello world";


    // showTime();
    // setInterval(showTime, 1000);
    // function showTime() {
    //     document.title = DateFormat("YYYY-MM-DD hh:mm:ss");
    // }

    var str = "类理论上能活1000岁，剩下的900多岁，为何无故消失了？";
    document.title = str;

    setInterval(function () {
        var list = str.split("");
        var char = list.shift();
        list.push(char);
        str = list.join("");
        document.title = str;
    }, 100);


    // 方法
    // Document对象的函数(方法)
    // getElementById() 返回对拥有指定 id 的第一个对象的引用。
    // getElementsByName() 返回带有指定名称的对象集合。
    // getElementsByTagName() 返回带有指定标签名的对象集合。
    // write() 向文档写 HTML 表达式 或 JavaScript 代码。




</script>

</html>